package com.ihunanren.biz.taobao.open;

import com.taobao.api.TaobaoResponse;

/**
 * @author kalman03
 */
public class TaobaoResponseHelper {

	/**
	 * like <code>Response error!code:1|msg:错误,subCode:2|subMsg:超级错误</code>
	 * 
	 * @param response
	 * @return
	 */
	public static String getResponseErrorMsg(TaobaoResponse response) {
		if (response == null)
			return null;
		StringBuilder sb = new StringBuilder();
		sb.append("Response error!").append("code:").append(response.getErrorCode()).append("|msg:")
				.append(response.getMsg()).append(",subCode:")
				.append(response.getSubCode()).append("|subMsg:")
				.append(response.getSubMsg());
		return sb.toString();
	}
}
